home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap24 / dun24_3.txt < prev   
Encoding:
Text File  |  1997-12-18  |  1.4 KB  |  56 lines

  1. <HTML>
  2.  
  3. <HEAD>
  4.  
  5. <TITLE>Special Effects</TITLE>
  6.  
  7.  
  8.  
  9. <SCRIPT LANGUAGE="VBScript">
  10.  
  11. sub doFade(obj)
  12.  
  13.     if obj.filters.blendTrans.status=0 then
  14.  
  15.         obj.filters.blendTrans.apply()
  16.  
  17.         obj.style.visibility="hidden"
  18.  
  19.     obj.filters.blendTrans.play()
  20.  
  21.     end if
  22.  
  23. end sub
  24.  
  25.  
  26.  
  27. sub doTrans(obj)
  28.  
  29.     if obj.filters.revealTrans.status=0 then
  30.  
  31.         obj.filters.revealTrans.apply()
  32.  
  33.  
  34.  
  35.         if right(obj.src,5)="1.gif" then
  36.  
  37.             obj.src="balloon2.gif"
  38.  
  39.         else
  40.  
  41.             obj.src="balloon1.gif"
  42.  
  43.         end if
  44.  
  45.  
  46.  
  47.         obj.filters.revealTrans.transition=TransType.value
  48.  
  49.         obj.filters.revealTrans.play()
  50.  
  51.     end if
  52.  
  53. end sub
  54.  
  55. </SCRIPT>
  56.  
  57. </HEAD>
  58.  
  59.  
  60.  
  61. <BODY>
  62.  
  63. <IMG SRC="balloon4.gif"
  64.  
  65.      id=balloon1
  66.  
  67.      STYLE="position:absolute;
  68.  
  69.             left:50;
  70.  
  71.             top:150;
  72.  
  73.             width:92;
  74.  
  75.             height:164;
  76.  
  77.             filter:blendTrans()">
  78.  
  79. <IMG SRC="balloon1.gif"
  80.  
  81.      id=balloon2
  82.  
  83.      STYLE="position:absolute;
  84.  
  85.             left:150;
  86.  
  87.             top:150;
  88.  
  89.             width:92;
  90.  
  91.             height:164;
  92.  
  93.             filter:revealTrans()">
  94.  
  95. <P>
  96.  
  97. <INPUT TYPE=BUTTON VALUE="Fade Out" onClick="doFade(balloon1)"><P>
  98.  
  99. Enter transition number (0-23):<BR>
  100.  
  101. <INPUT NAME=TransType TYPE=TEXT VALUE="0"><BR>
  102.  
  103. <INPUT TYPE=BUTTON VALUE="Do Transition" onClick="doTrans(balloon2)">
  104.  
  105. </BODY>
  106.  
  107.  
  108.  
  109. </HTML>
  110.  
  111.